package cn.wolfcode.rbac.mapper;

import cn.wolfcode.rbac.domain.Employee;
import cn.wolfcode.rbac.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public abstract interface EmployeeMapper {
    //删除员工
    public abstract int deleteByPrimaryKey(Long paramLong);

    //插入员工
    public abstract int insert(Employee paramEmployee);

    //按照id查询员工
    public abstract Employee selectByPrimaryKey(Long paramLong);

    //查询全部员工
    public abstract List<Employee> selectAll();

    //修改员工
    public abstract int updateByPrimaryKey(Employee paramEmployee);

    //分页-查询员工总个数
    //public abstract Integer selectForCount(QueryObject paramQueryObject);
    //分页-查询员工结果集
    public abstract List<Employee> selectForList(QueryObject paramQueryObject);

    //登入查询用户
    public abstract Employee selectByInfo(@Param("username") String paramString1, @Param("password") String paramString2);

    //往中间表插入，关系表
    public abstract void insertRelation(@Param("eid") Long eid, @Param("rid") Long rid);

    //删除用户，需要先删除关系表中的数据
    public abstract void deleteRelation(Long paramLong);

    public abstract void abtchDelete(Long[] ids);

    public abstract Long checkedName(String name);

    public abstract String selectSellerName(@Param("sellerId") Long sellerId);
}
